package com.bookshop.dao.impl;

import com.bookshop.dao.BaseDao;
import com.bookshop.dao.CategoryDao;

import java.sql.Connection;
import java.sql.SQLException;

public class CategoryDaoImpl extends BaseDao implements CategoryDao {
    public CategoryDaoImpl(Connection conn) {
        super(conn);
    }

    @Override
    public int deleteById(Integer id) throws SQLException {

        String sql = "delete from categorie where id =?";
        int result = super.update(sql, id);
        return result;
    }
}
